using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace HubLog
{
    public class Worker:Form1
    {
        private ManualResetEvent mre;
        public Worker(int n, ManualResetEvent mre)
        {
            //
            this.mre = mre;
            //
        }
        //
        public void WorkerCallback(Object threadContext)
        {
            //
            LogRecord lr = new LogRecord();
            lr.CreateRandomRecord("Instance" + ((int)threadContext).ToString());
            //
            //while (false == WorkerThreadsHandler._shouldStopFlag) Thread.Sleep(100);
            //Form1.addRecordD();
            for (int i = 0; i < 5; i++)
            {
                //Invoke(new addRecordDelegate(addRecord), new object[] { lr });
                //Invoke(new addRecordDelegate(addRecord));
                addRecord();
                //Invoke(new addRecordDelegate(addRecord));
                //addRecord(lr);
                //
                //addRecordDelegate ard = new addRecordDelegate(addRecord);
                //ard.Invoke(lr);
                //ard.Invoke(new lr);
                //addRecordDelegate ard = addRecord;
                //ard(lr);
                //MessageBox.Show("dataSetLog.HubLog.Count " + dataSetLog.HubLog.Count.ToString());
                //stripTextDelegate std = new stripTextDelegate(stripText);
                //std.Invoke("dataSetLog.HubLog.Count " + dataSetLog.HubLog.Count.ToString());
            }
            //bindingSource1.MoveLast();
			//invoke(new Form1.addRecordD(addRecord),new object[](lr)});
            //Form1.ActiveForm.Invoke(Form1.addRecordD(addRecord),new object[](lr)};
            //Form1.addRecordD();
            //
            //
            mre.Set();
        }
        //
    }//class Worker
    //
}//namespace
